package com.share.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.share.common.core.web.domain.BaseEntity;
import com.share.user.domain.UserVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @TableName order_info
 */
@Schema(description = "订单表")
@Data
public class OrderInfo extends BaseEntity {

    /**用户ID */

    @Schema(description = "用户ID")
    private Long userId;

    /**用户昵称 */

    @Schema(description = "用户昵称")
    private String nickname;

    /**订单号 */

    @Schema(description = "订单号")
    private String orderNo;

    /**充电宝编号 */

    @Schema(description = "充电宝编号")
    private String powerBankNo;

    /**借用开始时间 */

    @Schema(description = "借用开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**借用站点id */

    @Schema(description = "借用站点id")
    private Long startStationId;

    /**借用地点名称 */

    @Schema(description = "借用地点名称")
    private String startStationName;

    /**借用柜机编号 */

    @Schema(description = "借用柜机编号")
    private String startCabinetNo;

    /**归还时间 */

    @Schema(description = "归还时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**归还站点id */

    @Schema(description = "归还站点id")
    private Long endStationId;

    /**归还地点名称 */

    @Schema(description = "归还地点名称")
    private String endStationName;

    /**归还柜机编号 */

    @Schema(description = "归还柜机编号")
    private String endCabinetNo;

    /**借用时长 */

    @Schema(description = "借用时长")
    private Integer duration;

    /**费用规则 */

    @Schema(description = "费用规则")
    private String feeRule;

    /**费用规则id */

    @Schema(description = "费用规则id")
    private Long feeRuleId;

    /**总金额 */

    @Schema(description = "总金额")
    private BigDecimal totalAmount;

    /**抵扣金额 */

    @Schema(description = "抵扣金额")
    private BigDecimal deductAmount;

    /**实际订单金额 */

    @Schema(description = "实际订单金额")
    private BigDecimal realAmount;

    /**微信付款时间 */

    @Schema(description = "微信付款时间")
    private Date payTime;

    /**微信支付订单号 */

    @Schema(description = "微信支付订单号")
    private String transactionId;

    /**订单状态：0:充电中 1：未支付 2：已支付 */

    @Schema(description = "订单状态")
    private String status;

    /**订单账单表*/
    @TableField(exist = false)
    @Schema(description = "订单账单表")
    private List<OrderBill> orderBillList;


    /**用户类*/
    @TableField(exist = false)
    @Schema(description = "用户类")
    private UserVo userInfoVo;


}